package com.umxwe.kill.order.controller;


import com.umxwe.kill.core.domain.Result;
import com.umxwe.kill.core.template.ResultGenerator;
import com.umxwe.kill.order.domain.OrderInfo;
import com.umxwe.kill.order.service.OrderInfoService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "订单信息接口")
@RequestMapping("orderInfo")
public class OrderInfoController {

    @Autowired
    private OrderInfoService orderInfoService;

    @Value("${foo}")
    String foo;

    @GetMapping("getDomain")
    public Result<OrderInfo> getDomain(){
        OrderInfo domain = orderInfoService.getDomain(foo);
        return ResultGenerator.genSuccessResult(domain);
    }
}
